# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name： data_process
Description :
Author : 'li'
date： 2022/7/3
Change Activity:
2022/7/3:
-------------------------------------------------
"""
import torch


def inverse_sigmoid(x, eps=1e-3):
    """

    Args:
        x:
        eps:

    Returns:

    """
    x = x.clamp(min=0, max=1)
    x1 = x.clamp(min=eps)
    x2 = (1 - x).clamp(min=eps)
    return torch.log(x1 / x2)
